Display the name of the creator for flags & skins#3510
Conversation
WalkthroughAdds optional artist attribution to cosmetics: schema fields, a new Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/client/components/ArtistInfo.ts`:
- Line 31: The "Artist:" label in the ArtistInfo component is hardcoded; change
it to use translateText by importing translateText from ../Utils and replace the
literal "Artist:" with translateText('artist_label') (or another clear key)
where the template currently renders Artist: ${this.artist}; then add the
corresponding "artist_label": "Artist:" entry to en.json so the text is
localizable.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: b8c9234b-768e-4042-bb92-3c470feccbd3
📒 Files selected for processing (6)
src/client/FlagInputModal.tssrc/client/Store.tssrc/client/components/ArtistInfo.tssrc/client/components/FlagButton.tssrc/client/components/PatternButton.tssrc/core/CosmeticSchemas.ts
c07b2f3 to
5ac5a7d
Compare
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/client/components/FlagButton.ts (1)
57-62: Consider simplifying the dynamic class string for readability.This works, but extracting the conditional class parts into local constants will make future edits safer and easier.
♻️ Small readability refactor
render() { + const labelPaddingClass = this.flag.artist ? "pr-5" : ""; + const labelOpacityClass = this.requiresPurchase ? "opacity-50" : ""; + return html` @@ <div - class="text-[10px] font-bold text-white uppercase tracking-wider mt-1 ${this - .flag.artist - ? "pr-5" - : ""} text-center truncate w-full ${this.requiresPurchase - ? "opacity-50" - : ""}" + class="text-[10px] font-bold text-white uppercase tracking-wider mt-1 ${labelPaddingClass} text-center truncate w-full ${labelOpacityClass}" title="${translateCosmetic("flags", this.flag.name)}" >🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/client/components/FlagButton.ts` around lines 57 - 62, In the FlagButton component simplify the long dynamic class string by extracting the conditional fragments into local constants (e.g., artistPaddingClass for the flag.artist condition and purchaseOpacityClass for requiresPurchase) and then compose the final className using those constants plus the static classes; update the element that currently builds the template string to use these named variables (referencing this.flag.artist and this.requiresPurchase) so the class assembly is clearer and easier to maintain.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@src/client/components/FlagButton.ts`:
- Around line 57-62: In the FlagButton component simplify the long dynamic class
string by extracting the conditional fragments into local constants (e.g.,
artistPaddingClass for the flag.artist condition and purchaseOpacityClass for
requiresPurchase) and then compose the final className using those constants
plus the static classes; update the element that currently builds the template
string to use these named variables (referencing this.flag.artist and
this.requiresPurchase) so the class assembly is clearer and easier to maintain.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: a52969e4-1038-407a-af21-755804707a7c
📒 Files selected for processing (7)
resources/lang/en.jsonsrc/client/FlagInputModal.tssrc/client/Store.tssrc/client/components/ArtistInfo.tssrc/client/components/FlagButton.tssrc/client/components/PatternButton.tssrc/core/CosmeticSchemas.ts
✅ Files skipped from review due to trivial changes (3)
- resources/lang/en.json
- src/client/Store.ts
- src/client/components/ArtistInfo.ts
🚧 Files skipped from review as they are similar to previous changes (1)
- src/client/components/PatternButton.ts
Description:
So artists get credit for the work they do.
Please complete the following:
Please put your Discord username so you can be contacted if a bug or regression is found:
evan